filterNotNull

fun <L, R> Either<L, R?>.filterNotNull(): Either<L, R>?

Returns the same Right if its value is not null. Otherwise returns null.

Return

The same Right if its value is not null. Otherwise returns null.

Since

1.3

fun <L, R> LeftProjection<L?, R>.filterNotNull(): Either<L, R>?

Returns the same Left if its value is not null. Otherwise returns null.

Return

The same Left if its value is not null. Otherwise returns null.

fun <L, R> RightProjection<L, R?>.filterNotNull(): Either<L, R>?

Returns the same Right if its value is not null. Otherwise returns null.

Return

The same Right if its value is not null. Otherwise returns null.

fun <T> Try<T?>.filterNotNull(): Try<T>

Returns the same Success if its value is not null. Otherwise returns a Failure.

Return

The same Success if its value is not null. Otherwise returns a Failure.